package com.sxt;

import java.awt.*;

/**
 * @author 谭梦寻
 * @version 1.1
 */
public class Gold extends Object {

    //    无参构造器
    Gold() {
        this.x = (int)(Math.random()*700);//防止金块生成在窗体上
        this.y = (int)(Math.random()*550 +300);//防止金块生成在天上
        this.width = 52;
        this.height = 52;
        this.img = Toolkit.getDefaultToolkit().getImage("img/gold1.gif");
        this.m = 50;
        //    标记是否能移动
        this.flag = false;
        this.count = 4;
        this.type = 1;
    }
}
//  小金块
class MinGold extends Gold {

    //    无参构造器
    MinGold() {
        this.width = 36;
        this.height = 36;
        this.img = Toolkit.getDefaultToolkit().getImage("img/gold0.gif");
        this.m = 30;
        this.count = 2;
        this.type = 1;
        //    标记是否能移动
//        this.flag = false;
    }
}
//  大金块
class MaxGold extends Gold {

    //    无参构造器
    MaxGold() {
//        重置横坐标
        this.x = (int)(Math.random()*650);//防止金块生成在窗体上
        this.width = 105;
        this.height = 105;
        this.img = Toolkit.getDefaultToolkit().getImage("img/gold2.gif");
        this.m = 80;
        this.count = 8;
        this.type = 1;
        //    标记是否能移动
//        this.flag = false;
    }
}
